package com.itheima.helloworld.demos.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
@RequestMapping("hello")
public class HelloController {
    @GetMapping
    public String hello() {
        System.out.println("hello"+ LocalDateTime.now());
        return "Hello "+ LocalDateTime.now();
    }
    @GetMapping("/cat")
    public String cat() {
        System.out.println("cat"+ LocalDateTime.now());
        return "cat "+ LocalDateTime.now();
    }
}
